#ifndef __ICC178R_H 
#define __ICC178R_H
 

/****************************************
	ICC178R -serial command
*****************************************/
/*read a track of data or LRC*/
#define     ICC178R_READ_ONE_TRACK_DATE          0x01
#define     ICC178R_READ_TWO_TRACK_DATE          0x02
#define     ICC178R_READ_THREE_TRACK_DATE        0x03
#define     ICC178R_READ_ALL_TRACK_DATE          0x04

/*sysmtem control command*/
#define     ICC178R_FLUSH_RAM_BUFFER             0x05
#define     ICC178R_REPORT_STATUS                0x06
#define     ICC178R_RESET_CMD                    0x16

/*byte read a track of data or LRC*/
#define     ICC178R_READ_BYTE_ONE_TRACK_DATE     0x11
#define     ICC178R_READ_BYTE_TWO_TRACK_DATE     0x12
#define     ICC178R_READ_BYTE_THREE_TRACK_DATE   0x13
#define     ICC178R_READ_BYTE_ALL_TRACK_DATE     0x14
#define     ICC178R_CONTINUE_READ__DATE          0x15

#define     NoOp    0xff //Or 0xFF
/*********************************************************/

#define Bit(n)   (1<<n)

/*bit0 bit1 flag*/
#define READY_TO_READ(flag)            (((flag&Bit(0))==0) &&((flag&Bit(1))==0))//bit0 bit1 is all 0
#define NODATA_AVAILABLE(flag)         (((flag&Bit(0))==0) && (flag&Bit(1))) //bit0=0 bit1= 1
#define MAGS_READ_IN_PROGRESS(flag)    ((flag&Bit(0)) && ((flag&Bit(1))==0))//bit0=1 bit1 =0
#define MAGS_READ_IN_PROGRESS2(flag)   ((flag&Bit(0)) &&  (flag&Bit(1)))//bit0 bit1 is all 1

/*bit2 flag  Power on Reset  1*/
#define POWER_ON_RESET         Bit(2)

/*bit6 flag  invalid (not recognized) command  1*/
#define INVALID_COMMAND        Bit(6)

/*bit7 flag  Out of Order bit  1*/
#define OUT_OF_ORDER_BIT       Bit(7)





#endif
